package cn.dengta.webapp.trade.model;

import cn.dengta.common.model.ValueProxy;
import cn.dengta.common.model.ValueProxyImpl;
import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;

@Getter
public enum UserEquityType implements ValueProxyImpl<UserEquityType, Integer> {
	VIDEO(1, "视频卡"),
	AUDIO(2, "语音卡"),
	GIFT(3, "礼物"),
	AVATAR(4, "头像框");
	@EnumValue
	public final Integer value;

	final ValueProxy<UserEquityType, Integer> proxy;

	UserEquityType(Integer value, String label) {
		this.value = value;
		this.proxy = new ValueProxy<>(this, value, label);
	}

	public static UserEquityType[] getValues() {
		return ValueProxy.getCachedArray(UserEquityType.class, UserEquityType::values);
	}

	public static UserEquityType of(Integer value) {
		return VIDEO.getValueOf(value);
	}

}
